// import {
//   PerspectiveCamera,
//   Scene,
//   WebGLRenderer,
//   Mesh,
//   BoxBufferGeometry,
//   MeshBasicMaterial,
//   TextureLoader,
//   PlaneBufferGeometry,
//   DoubleSide,
//   NearestFilter,
//   Clock,
//   AxesHelper,
//   BufferAttribute,
// } from "three";
// import { BufferGeometryUtils } from "three/examples/jsm/utils/BufferGeometryUtils";
// import { FirstPersonControls } from "three/examples/jsm/controls/FirstPersonControls";
// import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";

// let camera: PerspectiveCamera, scene: Scene, renderer: WebGLRenderer;
// let mesh: Mesh;
// let controls: OrbitControls;
// const clock = new Clock();
// init();
// animate();

// function init() {
//   camera = new PerspectiveCamera(
//     70,
//     window.innerWidth / window.innerHeight,
//     1,
//     1000
//   );
//   camera.position.z = 400;

//   scene = new Scene();
//   let axes = new AxesHelper(200)
//   scene.add(axes)

//   const pxGeometry = new PlaneBufferGeometry(100, 100);
//   pxGeometry.attributes.uv.array[ 1 ] = 0.5;
//   pxGeometry.attributes.uv.array[ 3 ] = 0.5;
//   pxGeometry.rotateY(Math.PI / 2);
//   pxGeometry.translate(50, 0, 0);

//   const nxGeometry = new PlaneBufferGeometry(100, 100);
//   nxGeometry.attributes.uv.array[ 1 ] = 0.5;
//   nxGeometry.attributes.uv.array[ 3 ] = 0.5;
//   nxGeometry.rotateY(-Math.PI / 2);
//   nxGeometry.translate(-50, 0, 0);

//   const pyGeometry = new PlaneBufferGeometry(100, 100);
//   pyGeometry.attributes.uv.array[ 5 ] = 0.5;
//   pyGeometry.attributes.uv.array[ 7 ] = 0.5;
//   pyGeometry.rotateX(Math.PI / 2);
//   pyGeometry.translate(0, 50, 0);

//   const nyGeometry = new PlaneBufferGeometry(100, 100);
//   nyGeometry.attributes.uv.array[ 1 ] = 0.3;
//   nyGeometry.attributes.uv.array[ 3 ] = 0.3;
//   nyGeometry.rotateX(-Math.PI / 2);
//   nyGeometry.translate(0, -50, 0);

//   const pzGeometry = new PlaneBufferGeometry(100, 100);
//   pzGeometry.attributes.uv.array[ 1 ] = 0.5;
//   pzGeometry.attributes.uv.array[ 3 ] = 0.5;
//   pzGeometry.translate(0, 0, 50);

//   const nzGeometry = new PlaneBufferGeometry(100, 100);
//   nzGeometry.attributes.uv.array[ 1 ] = 0.5;
//   nzGeometry.attributes.uv.array[ 3 ] = 0.5;
//   nzGeometry.rotateY(Math.PI);
//   nzGeometry.translate(0, 0, -50);

//   let unionGeometry = BufferGeometryUtils.mergeBufferGeometries([
//     pxGeometry,
//     pyGeometry,
//     pzGeometry,
//     nxGeometry,
//     nyGeometry,
//     nzGeometry,
//   ]);

//   let texture = new TextureLoader().load(
//     require("../static/images/atlas.png").default
//   );
//   texture.magFilter = NearestFilter;
//   let material = new MeshBasicMaterial({
//     map: texture,
//     side: DoubleSide,
//   });
//   mesh = new Mesh(unionGeometry, material);
//   scene.add(mesh);

//   renderer = new WebGLRenderer({ antialias: true });
//   renderer.setPixelRatio(window.devicePixelRatio);
//   renderer.setSize(window.innerWidth, window.innerHeight);
//   controls = new OrbitControls(camera, renderer.domElement);
//   controls.minDistance = 100;
//   controls.maxDistance = 1000;
//   document.body.appendChild(renderer.domElement);
//   // renderer.render(scene, camera);
// }

// function animate() {
//   requestAnimationFrame(animate);
//   renderer.render(scene, camera);
// }
